<template>
<div>
  <ul v-if="fileUrl" class="actDetTextList hwui-pa10">
    <li v-for="(item, index) in fileUrl" v-if="!isPic(item.fileSuffix)&&!isVideo(item.fileSuffix)">
      <a  href="javascript:void(0)" class="hwui-fc-link"
          @click="downFile(item)"><i class="el-icon-paperclip hwui-mr4"></i>{{item.fileRealName}}</a>
    </li>
  </ul>
  </div>
</template>

<script>
  import fileType from '../fileType.js';
  export default {
    name: "filePreview",
    componentName: 'filePreview',
    mixins:[fileType],
    props: {
      fileUrl:null
    },
    data(){
      return {

      }
    },
    methods:{
      downFile(item){
          let data = "/testWeb/openDocInPdf.action?id=123"
          window.open('/static/pdf/web/viewer.html?file=' +encodeURIComponent(data))
      }
    }
  }
</script>

<style scoped>
  .imgSingle img{width: 100px;height: 100px;margin-right: 10px;margin-bottom: 10px}
</style>
<!--0225-->
